package com.aprivate.leo.commonlib.utils;

import android.content.Context;
import android.widget.Toast;

import java.lang.ref.WeakReference;

/**
 * Author: Administrator
 * Date: 2020/2/10
 * Project: ModularizationTemplateApp
 * Description:
 */
public class ToastUtils {
    private ToastUtils() {
    }

    public static void showToast(WeakReference<Context> reference, String msg) {
        Context context = reference.get();
        if (context != null) {
            Toast.makeText(context.getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
        }
    }
}
